package com.tiantianfresh.admin.service.Impl;

import com.tiantianfresh.admin.service.CategorygroupingService;
import com.tiantianfresh.model.dao.CategorygroupingMapper;
import com.tiantianfresh.model.pojo.Categorygrouping;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class CategorygroupingServiceImpl implements CategorygroupingService {
    @Resource
    private CategorygroupingMapper categorygroupingMapper;
    //查询全部Categorygrouping
    @Override
    public List<Categorygrouping> selectAll() {
        return categorygroupingMapper.selectAll();
    }
    //添加一个Categorygrouping
    @Override
    public int addCategorygrouping(Categorygrouping categorygrouping) {
        return categorygroupingMapper.addCategorygrouping(categorygrouping);
    }
    //根据id删除一个Categorygrouping
    @Override
    public int deleteCategorygroupingById(int id) {
        return categorygroupingMapper.deleteCategorygroupingById(id);
    }

    @Override
    public int updateCategorygrouping(Categorygrouping categorygrouping) {
        return categorygroupingMapper.updateCategorygrouping(categorygrouping);
    }

    @Override
    public Categorygrouping queryCategorygroupingById(int id) {
        return categorygroupingMapper.queryCategorygroupingById(id);
    }
}
